package com.le.tester.tip;

import java.util.concurrent.atomic.AtomicLong;

/**
 * createTime：2022/2/10 15:41
 * description：yield即当前线程让出当前cpu的时间片，那么这个线程就会从就绪的状态变成
 */
public class YieldDemo2 implements Runnable {

    @Override
    public void run() {
        long resultValue = new AtomicLong(0L).decrementAndGet();
        System.out.println(resultValue);
        System.out.println(Thread.currentThread().getName() + " state is " + Thread.currentThread().getState());
    }
}
